#ifndef FILEMANAGER_H_
#define FILEMANAGER_H_
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <string>
#include "../Entities/IRecordable.h"
using namespace std;
using namespace Entities;

namespace Managers {

class FileManager {

protected:

	fstream fileStream;
	string filePath;
	void openFile();
	void closeFile();

public:

	FileManager(string filePath);

	virtual void readRecord(IRecordable* record,unsigned int startingPosition) = 0;
	virtual unsigned int writeRecord(IRecordable* record) = 0;
	virtual bool eraseRecord(IRecordable* record) = 0;

	virtual ~FileManager();

};

}

#endif /* FILEMANAGER_H_ */

